package telas.vendaExterna;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JButton;
import java.awt.SystemColor;

public class TelaVendaExterna extends JFrame {

	private JPanel contentPane;
	private JTextField tfCidade;
	private JTable table;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TelaVendaExterna frame = new TelaVendaExterna();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public TelaVendaExterna() {
		super("Venda Externa");
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setSize(800, 600);
		setVisible(true);
		setResizable(false);
		setLocationRelativeTo(null);
		
		contentPane = new JPanel();
		contentPane.setBackground(SystemColor.controlHighlight);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblLogo = new JLabel("");
		lblLogo.setIcon(new ImageIcon(TelaVendaExterna.class.getResource("/telas/sistema/figuras/LogoComFundo2.png")));
		lblLogo.setBounds(0, 0, 794, 144);
		contentPane.add(lblLogo);
		
		JLabel lblDescrioDaVenda = new JLabel("Venda Externa");
		lblDescrioDaVenda.setFont(new Font("Tahoma", Font.BOLD, 18));
		lblDescrioDaVenda.setBounds(10, 156, 352, 19);
		contentPane.add(lblDescrioDaVenda);
		
		JLabel lblCidade = new JLabel("Cidade");
		lblCidade.setFont(new Font("Tahoma", Font.PLAIN, 12));
		lblCidade.setBounds(12, 187, 115, 16);
		contentPane.add(lblCidade);
		
		tfCidade = new JTextField();
		tfCidade.setColumns(10);
		tfCidade.setBounds(12, 203, 494, 20);
		contentPane.add(tfCidade);
		
		JLabel lblDia = new JLabel("Dia");
		lblDia.setFont(new Font("Tahoma", Font.PLAIN, 12));
		lblDia.setBounds(518, 187, 51, 15);
		contentPane.add(lblDia);
		
		JComboBox cbxDia = new JComboBox();
		cbxDia.setModel(new DefaultComboBoxModel(new String[] {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"}));
		cbxDia.setBounds(518, 203, 80, 20);
		contentPane.add(cbxDia);
		
		JLabel lblMes = new JLabel("M\u00EAs");
		lblMes.setFont(new Font("Tahoma", Font.PLAIN, 12));
		lblMes.setBounds(610, 187, 51, 15);
		contentPane.add(lblMes);
		
		JComboBox cbxMes = new JComboBox();
		cbxMes.setModel(new DefaultComboBoxModel(new String[] {"Janeiro", "Fevereiro", "Mar\u00E7o", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"}));
		cbxMes.setBounds(610, 203, 80, 20);
		contentPane.add(cbxMes);
		
		JLabel lblAno = new JLabel("Ano");
		lblAno.setFont(new Font("Tahoma", Font.PLAIN, 12));
		lblAno.setBounds(702, 187, 51, 15);
		contentPane.add(lblAno);
		
		JComboBox cbxAno = new JComboBox();
		cbxAno.setModel(new DefaultComboBoxModel(new String[] {"2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018"}));
		cbxAno.setBounds(702, 203, 80, 20);
		contentPane.add(cbxAno);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(10, 235, 772, 287);
		contentPane.add(scrollPane);
		
		table = new JTable();
		scrollPane.setViewportView(table);
		
		JButton btnEditarVenda = new JButton("  Editar Venda (F2)");
		btnEditarVenda.setIcon(new ImageIcon(TelaVendaExterna.class.getResource("/telas/sistema/figuras/page_edit.png")));
		btnEditarVenda.setBounds(10, 534, 173, 26);
		contentPane.add(btnEditarVenda);
		
		JButton btnExcluirVenda = new JButton("Excluir Venda (delete)");
		btnExcluirVenda.setIcon(new ImageIcon(TelaVendaExterna.class.getResource("/telas/sistema/figuras/bullet_cross.png")));
		btnExcluirVenda.setBounds(195, 534, 187, 26);
		contentPane.add(btnExcluirVenda);
		
		JButton btnSalvarAlteracoes = new JButton("Salvar Altera\u00E7\u00F5es");
		btnSalvarAlteracoes.setIcon(new ImageIcon(TelaVendaExterna.class.getResource("/telas/sistema/figuras/disk.png")));
		btnSalvarAlteracoes.setBounds(595, 534, 187, 26);
		contentPane.add(btnSalvarAlteracoes);
	}
}
